package orm

//db类型

type DbDriverType int
type DbDriverName string

//const (
//	DbDriverTypeMysql  DbDriverType  = iota
//	DbDriverTypeMongo
//	)
//const  (
//	DbDriverNameMysql  DbDriverName ="mysql"
//	DbDriverNameMongodb  DbDriverName ="mongodb"
//)

//var drivers   = map[DbDriverName]DbDriverType{
//	DbDriverNameMysql:    DbDriverTypeMysql,
//	DbDriverNameMongodb: DbDriverTypeMongo,
//}

type DbBase interface {
	//where() interface{}
	Get(query interface{}, out interface{}) error
	GetById(id int, out interface{}) error
	FindBySql(sql string, out interface{}) error
	Insert(bean interface{}) error
	UpdateById(id int, bean interface{}) error
}
